home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / IntlResources.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  13.4 KB  |  388 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        IntlResources.h
  3.  
  4.      Contains:    International Resource definitions.
  5.  
  6.      Version:    Technology:    System 7.5+
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1983-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __INTLRESOURCES__
  18. #define __INTLRESOURCES__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47. enum {
  48.                                                                 /* Bits in the itlcFlags byte */
  49.     itlcShowIcon                = 7,                            /*Show icon even if only one script*/
  50.     itlcDualCaret                = 6,                            /*Use dual caret for mixed direction text*/
  51.                                                                 /* Bits in the itlcSysFlags word */
  52.     itlcSysDirection            = 15                            /*System direction - left to right/right to left*/
  53. };
  54.  
  55. enum {
  56.                                                                 /* One more flag in the itlcFlags byte */
  57.     itlcDisableKeyScriptSync    = 3                                /*Disable font and keyboard script synchrinozation*/
  58. };
  59.  
  60. enum {
  61.                                                                 /* We should define masks, too. */
  62.     itlcDisableKeyScriptSyncMask = 1 << itlcDisableKeyScriptSync /*Disable font and keyboard script synchrinozation mask*/
  63. };
  64.  
  65.  
  66. enum {
  67.     tokLeftQuote                = 1,                            /* NumberParts.data[] enumerators                                             */
  68.     tokRightQuote                = 2,                            /*  In general, these are NOT to be considered indices into the data[] array */
  69.     tokLeadPlacer                = 3,
  70.     tokLeader                    = 4,
  71.     tokNonLeader                = 5,
  72.     tokZeroLead                    = 6,
  73.     tokPercent                    = 7,
  74.     tokPlusSign                    = 8,
  75.     tokMinusSign                = 9,
  76.     tokThousands                = 10,
  77.     tokReserved                    = 11,                            /* 11 is reserved field */
  78.     tokSeparator                = 12,
  79.     tokEscape                    = 13,
  80.     tokDecPoint                    = 14,
  81.     tokEPlus                    = 15,
  82.     tokEMinus                    = 16,
  83.     tokMaxSymbols                = 31,
  84.     curNumberPartsVersion        = 1                                /*current version of NumberParts record*/
  85. };
  86.  
  87. enum {
  88.     currSymLead                    = 16,
  89.     currNegSym                    = 32,
  90.     currTrailingZ                = 64,
  91.     currLeadingZ                = 128
  92. };
  93.  
  94. enum {
  95.     mdy                            = 0,
  96.     dmy                            = 1,
  97.     ymd                            = 2,
  98.     myd                            = 3,
  99.     dym                            = 4,
  100.     ydm                            = 5
  101. };
  102.  
  103. typedef SInt8                             DateOrders;
  104. enum {
  105.     timeCycle24                    = 0,                            /*time sequence 0:00 - 23:59*/
  106.     timeCycleZero                = 1,                            /*time sequence 0:00-11:59, 0:00 - 11:59*/
  107.     timeCycle12                    = 255,                            /*time sequence 12:00 - 11:59, 12:00 - 11:59*/
  108.     zeroCycle                    = 1,                            /*old name for timeCycleZero*/
  109.     longDay                        = 0,                            /*day of the month*/
  110.     longWeek                    = 1,                            /*day of the week*/
  111.     longMonth                    = 2,                            /*month of the year*/
  112.     longYear                    = 3,                            /*year*/
  113.     supDay                        = 1,                            /*suppress day of month*/
  114.     supWeek                        = 2,                            /*suppress day of week*/
  115.     supMonth                    = 4,                            /*suppress month*/
  116.     supYear                        = 8,                            /*suppress year*/
  117.     dayLdingZ                    = 32,
  118.     mntLdingZ                    = 64,
  119.     century                        = 128,
  120.     secLeadingZ                    = 32,
  121.     minLeadingZ                    = 64,
  122.     hrLeadingZ                    = 128
  123. };
  124.  
  125. /* move OffsetTable to QuickdrawText */
  126.  
  127. struct Intl0Rec {
  128.     char                             decimalPt;                    /*decimal point character*/
  129.     char                             thousSep;                    /*thousands separator character*/
  130.     char                             listSep;                    /*list separator character*/
  131.     char                             currSym1;                    /*currency symbol*/
  132.     char                             currSym2;
  133.     char                             currSym3;
  134.     UInt8                             currFmt;                    /*currency format flags*/
  135.     UInt8                             dateOrder;                    /*order of short date elements: mdy, dmy, etc.*/
  136.     UInt8                             shrtDateFmt;                /*format flags for each short date element*/
  137.     char                             dateSep;                    /*date separator character*/
  138.     UInt8                             timeCycle;                    /*specifies time cycle: 0..23, 1..12, or 0..11*/
  139.     UInt8                             timeFmt;                    /*format flags for each time element*/
  140.     char                             mornStr[4];                    /*trailing string for AM if 12-hour cycle*/
  141.     char                             eveStr[4];                    /*trailing string for PM if 12-hour cycle*/
  142.     char                             timeSep;                    /*time separator character*/
  143.     char                             time1Suff;                    /*trailing string for AM if 24-hour cycle*/
  144.     char                             time2Suff;
  145.     char                             time3Suff;
  146.     char                             time4Suff;
  147.     char                             time5Suff;                    /*trailing string for PM if 24-hour cycle*/
  148.     char                             time6Suff;
  149.     char                             time7Suff;
  150.     char                             time8Suff;
  151.     UInt8                             metricSys;                    /*255 if metric, 0 if inches etc.*/
  152.     short                             intl0Vers;                    /*region code (hi byte) and version (lo byte)*/
  153. };
  154. typedef struct Intl0Rec                    Intl0Rec;
  155.  
  156. typedef Intl0Rec *                        Intl0Ptr;
  157. typedef Intl0Ptr *                        Intl0Hndl;
  158.  
  159. struct Intl1Rec {
  160.     Str15                             days[7];                    /*day names*/
  161.     Str15                             months[12];                    /*month names*/
  162.     UInt8                             suppressDay;                /*255 for no day, or flags to suppress any element*/
  163.     UInt8                             lngDateFmt;                    /*order of long date elements*/
  164.     UInt8                             dayLeading0;                /*255 for leading 0 in day number*/
  165.     UInt8                             abbrLen;                    /*length for abbreviating names*/
  166.     char                             st0[4];                        /*separator strings for long date format*/
  167.     char                             st1[4];
  168.     char                             st2[4];
  169.     char                             st3[4];
  170.     char                             st4[4];
  171.     short                             intl1Vers;                    /*region code (hi byte) and version (lo byte)*/
  172.     short                             localRtn[1];                /*now a flag for opt extension*/
  173. };
  174. typedef struct Intl1Rec                    Intl1Rec;
  175.  
  176. typedef Intl1Rec *                        Intl1Ptr;
  177. typedef Intl1Ptr *                        Intl1Hndl;
  178. /*fields for optional itl1 extension*/
  179.  
  180. struct Itl1ExtRec {
  181.     Intl1Rec                         base;                        /*un-extended Intl1Rec*/
  182.     short                             version;
  183.     short                             format;
  184.     short                             calendarCode;                /*calendar code for this itl1 resource*/
  185.     long                             extraDaysTableOffset;        /*offset in itl1 to extra days table*/
  186.     long                             extraDaysTableLength;        /*length of extra days table*/
  187.     long                             extraMonthsTableOffset;        /*offset in itl1 to extra months table*/
  188.     long                             extraMonthsTableLength;        /*length of extra months table*/
  189.     long                             abbrevDaysTableOffset;        /*offset in itl1 to abbrev days table*/
  190.     long                             abbrevDaysTableLength;        /*length of abbrev days table*/
  191.     long                             abbrevMonthsTableOffset;    /*offset in itl1 to abbrev months table*/
  192.     long                             abbrevMonthsTableLength;    /*length of abbrev months table*/
  193.     long                             extraSepsTableOffset;        /*offset in itl1 to extra seps table*/
  194.     long                             extraSepsTableLength;        /*length of extra seps table*/
  195.     short                             tables[1];                    /*now a flag for opt extension*/
  196. };
  197. typedef struct Itl1ExtRec                Itl1ExtRec;
  198.  
  199. struct UntokenTable {
  200.     short                             len;
  201.     short                             lastToken;
  202.     short                             index[256];                    /*index table; last = lastToken*/
  203. };
  204. typedef struct UntokenTable                UntokenTable;
  205. typedef UntokenTable *                    UntokenTablePtr;
  206. typedef UntokenTablePtr *                UntokenTableHandle;
  207.  
  208. union WideChar {
  209.     char                             a[2];                        /*0 is the high order character*/
  210.     short                             b;
  211. };
  212. typedef union WideChar                    WideChar;
  213.  
  214. struct WideCharArr {
  215.     short                             size;
  216.     WideChar                         data[10];
  217. };
  218. typedef struct WideCharArr                WideCharArr;
  219.  
  220. struct NumberParts {
  221.     short                             version;
  222.     WideChar                         data[31];                    /*index by [tokLeftQuote..tokMaxSymbols]*/
  223.     WideCharArr                     pePlus;
  224.     WideCharArr                     peMinus;
  225.     WideCharArr                     peMinusPlus;
  226.     WideCharArr                     altNumTable;
  227.     char                             reserved[20];
  228. };
  229. typedef struct NumberParts                NumberParts;
  230. typedef NumberParts *                    NumberPartsPtr;
  231.  
  232.  
  233. struct Itl4Rec {
  234.     short                             flags;                        /*reserved*/
  235.     long                             resourceType;                /*contains 'itl4'*/
  236.     short                             resourceNum;                /*resource ID*/
  237.     short                             version;                    /*version number*/
  238.     long                             resHeader1;                    /*reserved*/
  239.     long                             resHeader2;                    /*reserved*/
  240.     short                             numTables;                    /*number of tables, one-based*/
  241.     long                             mapOffset;                    /*offset to table that maps byte to token*/
  242.     long                             strOffset;                    /*offset to routine that copies canonical string*/
  243.     long                             fetchOffset;                /*offset to routine that gets next byte of character*/
  244.     long                             unTokenOffset;                /*offset to table that maps token to canonical string*/
  245.     long                             defPartsOffset;                /*offset to default number parts table*/
  246.     long                             resOffset6;                    /*reserved*/
  247.     long                             resOffset7;                    /*reserved*/
  248.     long                             resOffset8;                    /*reserved*/
  249. };
  250. typedef struct Itl4Rec                    Itl4Rec;
  251.  
  252. typedef Itl4Rec *                        Itl4Ptr;
  253. typedef Itl4Ptr *                        Itl4Handle;
  254. /* New NItl4Rec for System 7.0: */
  255.  
  256. struct NItl4Rec {
  257.     short                             flags;                        /*reserved*/
  258.     long                             resourceType;                /*contains 'itl4'*/
  259.     short                             resourceNum;                /*resource ID*/
  260.     short                             version;                    /*version number*/
  261.     short                             format;                        /*format code*/
  262.     short                             resHeader;                    /*reserved*/
  263.     long                             resHeader2;                    /*reserved*/
  264.     short                             numTables;                    /*number of tables, one-based*/
  265.     long                             mapOffset;                    /*offset to table that maps byte to token*/
  266.     long                             strOffset;                    /*offset to routine that copies canonical string*/
  267.     long                             fetchOffset;                /*offset to routine that gets next byte of character*/
  268.     long                             unTokenOffset;                /*offset to table that maps token to canonical string*/
  269.     long                             defPartsOffset;                /*offset to default number parts table*/
  270.     long                             whtSpListOffset;            /*offset to white space code list*/
  271.     long                             resOffset7;                    /*reserved*/
  272.     long                             resOffset8;                    /*reserved*/
  273.     short                             resLength1;                    /*reserved*/
  274.     short                             resLength2;                    /*reserved*/
  275.     short                             resLength3;                    /*reserved*/
  276.     short                             unTokenLength;                /*length of untoken table*/
  277.     short                             defPartsLength;                /*length of default number parts table*/
  278.     short                             whtSpListLength;            /*length of white space code list*/
  279.     short                             resLength7;                    /*reserved*/
  280.     short                             resLength8;                    /*reserved*/
  281. };
  282. typedef struct NItl4Rec                    NItl4Rec;
  283.  
  284. typedef NItl4Rec *                        NItl4Ptr;
  285. typedef NItl4Ptr *                        NItl4Handle;
  286.  
  287.  
  288. struct TableDirectoryRecord {
  289.     OSType                             tableSignature;                /*4 byte long table name */
  290.     unsigned long                     reserved;                    /*Reserved for internal use */
  291.     unsigned long                     tableStartOffset;            /*Table start offset in byte*/
  292.     unsigned long                     tableSize;                    /*Table size in byte*/
  293. };
  294. typedef struct TableDirectoryRecord        TableDirectoryRecord;
  295.  
  296. struct Itl5Record {
  297.     Fixed                             versionNumber;                /*itl5 resource version number */
  298.     unsigned short                     numberOfTables;                /*Number of tables it contains */
  299.     unsigned short                     reserved[3];                /*Reserved for internal use */
  300.     TableDirectoryRecord             tableDirectory[1];            /*Table directory records */
  301. };
  302. typedef struct Itl5Record                Itl5Record;
  303.  
  304. struct RuleBasedTrslRecord {
  305.     short                             sourceType;                    /*Transliterate target type for the LHS of the rule */
  306.     short                             targetType;                    /*Transliterate target type for the RHS of the rule */
  307.     short                             formatNumber;                /*Transliterate resource format number */
  308.     short                             propertyFlag;                /*Transliterate property flags */
  309.     short                             numberOfRules;                /*Number of rules following this field */
  310. };
  311. typedef struct RuleBasedTrslRecord        RuleBasedTrslRecord;
  312.  
  313.  
  314. struct ItlcRecord {
  315.     short                             itlcSystem;                    /*default system script*/
  316.     short                             itlcReserved;                /*reserved*/
  317.     SInt8                             itlcFontForce;                /*default font force flag*/
  318.     SInt8                             itlcIntlForce;                /*default intl force flag*/
  319.     SInt8                             itlcOldKybd;                /*MacPlus intl keybd flag*/
  320.     SInt8                             itlcFlags;                    /*general flags*/
  321.     short                             itlcIconOffset;                /*keyboard icon offset; not used in 7.0*/
  322.     SInt8                             itlcIconSide;                /*keyboard icon side; not used in 7.0*/
  323.     SInt8                             itlcIconRsvd;                /*rsvd for other icon info*/
  324.     short                             itlcRegionCode;                /*preferred verXxx code*/
  325.     short                             itlcSysFlags;                /*flags for setting system globals*/
  326.     SInt8                             itlcReserved4[32];            /*for future use*/
  327. };
  328. typedef struct ItlcRecord                ItlcRecord;
  329.  
  330. struct ItlbRecord {
  331.     short                             itlbNumber;                    /*itl0 id number*/
  332.     short                             itlbDate;                    /*itl1 id number*/
  333.     short                             itlbSort;                    /*itl2 id number*/
  334.     short                             itlbFlags;                    /*Script flags*/
  335.     short                             itlbToken;                    /*itl4 id number*/
  336.     short                             itlbEncoding;                /*itl5 ID # (optional; char encoding)*/
  337.     short                             itlbLang;                    /*current language for script */
  338.     SInt8                             itlbNumRep;                    /*number representation code*/
  339.     SInt8                             itlbDateRep;                /*date representation code */
  340.     short                             itlbKeys;                    /*KCHR id number*/
  341.     short                             itlbIcon;                    /*ID # of SICN or kcs#/kcs4/kcs8 suite.*/
  342. };
  343. typedef struct ItlbRecord                ItlbRecord;
  344. /* New ItlbExtRecord structure for System 7.0 */
  345.  
  346. struct ItlbExtRecord {
  347.     ItlbRecord                         base;                        /*un-extended ItlbRecord*/
  348.     long                             itlbLocalSize;                /*size of script's local record*/
  349.     short                             itlbMonoFond;                /*default monospace FOND ID*/
  350.     short                             itlbMonoSize;                /*default monospace font size*/
  351.     short                             itlbPrefFond;                /*preferred FOND ID*/
  352.     short                             itlbPrefSize;                /*preferred font size*/
  353.     short                             itlbSmallFond;                /*default small FOND ID*/
  354.     short                             itlbSmallSize;                /*default small font size*/
  355.     short                             itlbSysFond;                /*default system FOND ID*/
  356.     short                             itlbSysSize;                /*default system font size*/
  357.     short                             itlbAppFond;                /*default application FOND ID*/
  358.     short                             itlbAppSize;                /*default application font size*/
  359.     short                             itlbHelpFond;                /*default Help Mgr FOND ID*/
  360.     short                             itlbHelpSize;                /*default Help Mgr font size*/
  361.     Style                             itlbValidStyles;            /*set of valid styles for script*/
  362.     Style                             itlbAliasStyle;                /*style (set) to mark aliases*/
  363. };
  364. typedef struct ItlbExtRecord            ItlbExtRecord;
  365.  
  366.  
  367.  
  368. #if PRAGMA_STRUCT_ALIGN
  369.     #pragma options align=reset
  370. #elif PRAGMA_STRUCT_PACKPUSH
  371.     #pragma pack(pop)
  372. #elif PRAGMA_STRUCT_PACK
  373.     #pragma pack()
  374. #endif
  375.  
  376. #ifdef PRAGMA_IMPORT_OFF
  377. #pragma import off
  378. #elif PRAGMA_IMPORT
  379. #pragma import reset
  380. #endif
  381.  
  382. #ifdef __cplusplus
  383. }
  384. #endif
  385.  
  386. #endif /* __INTLRESOURCES__ */
  387.  
  388.